package com.briup.cms.dao;

import com.briup.cms.bean.Privilege;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface PrivilegeMapper {






    @Select("select * from privilege")
    List<Privilege> selectAll();

    @Insert("insert into privilege values(null,#{name},#{icon},#{type},#{path},#{is_hidden},#{introduce},#{parent_id})")
    void insert(Privilege privilege );

    @Update("update privilege set name=#{name},icon=#{icon},type=#{type},path=#{path},is_hidden=#{is_hidden},introduce=#{introduce},parent_id=#{parent_id} where id=#{id}")
    void update(Privilege privilege) ;

    @Delete("delete from privilege where id=#{id}")
    void deleteById(Long id);
}
